export function formatDate(time) {
    var date = new Date(time);
    let Y = date.getFullYear()
    let M = date.getMonth() + 1 - 0 >= 10 ? Number(date.getMonth()) + 1 : '0' + (Number(date.getMonth()) + 1)
    let D = date.getDate()
    let h = date.getHours() >= 10 ? date.getHours() : '0' + date.getHours()
    let m = date.getMinutes() >= 10 ? date.getMinutes() : '0' + date.getMinutes()
    let s = date.getSeconds() >= 10 ? date.getSeconds() : '0' + date.getSeconds()
    return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s
}

